UNPKG

mantis-app

Version:

M.A.N.T.I.S (MongoDB, Analog, Nx, Tailwind CSS, Ionic, Storybook) is not just a CLI tool; it's your passport to a seamless full-stack project launch.

9 lines (7 loc) 304 B
import { defineEventHandler, getRouterParam } from 'h3'; import { useTodo } from '../../../schemas/todo.schema'; export default defineEventHandler(async (event) => { const id = getRouterParam(event, 'id'); const Todo = await useTodo(); return await Todo.findByIdAndDelete({ _id: id }).exec(); });